
//找最大值及其下标
#ifdef a
#include<stdio.h>
#define N 10
int fun(int* a, int* b, int n);
int main()
{
    int a[N], i, max, p = 0;
    for (i = 0; i < N; i++) scanf("%d", &a[i]);
    max = fun(a, &p, N);
    printf("max=%d,position=%d\n", max, p);
    return 0;
}

int fun(int* a, int* b, int n) {
    int max_pos = 0;
    for (int i = 0; i < n; i++)
        if (a[max_pos] < a[i])
            max_pos = i;
    *b = max_pos;
    return a[max_pos];
}
#endif
